import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/fonts/iconfont.css'
import './assets/fonts/iconfont.js'
import './assets/css/reset.css'
import 'vue2-editor/dist/vue2-editor.css'
import {
  Tabbar, TabbarItem, Icon, Search, Swipe, SwipeItem,
  Grid, GridItem, Tab, Tabs, Sticky, PullRefresh, List,
  Sidebar, SidebarItem, CollapseItem, Collapse, Card, Empty, NavBar,
  GoodsAction, GoodsActionIcon, GoodsActionButton, Popup, Stepper,
  SwipeCell, Button, Checkbox, CheckboxGroup, SubmitBar, Badge, Toast,
  ContactCard, AddressEdit, AddressList, Form, Field, NoticeBar, Lazyload,
  Divider
  , Image as VanImage, Uploader
} from 'vant'

import loadingPlugin from '@/plugins/Loading'
Vue.use(loadingPlugin)
const loadimage = require('./assets/img/loading.gif')
Vue.use(Icon).use(Tabbar).use(TabbarItem)
  .use(Search).use(Swipe).use(SwipeItem)
  .use(Grid).use(GridItem).use(Tab).use(Tabs)
  .use(Sticky).use(PullRefresh).use(List)
  .use(Sidebar).use(SidebarItem).use(Collapse)
  .use(CollapseItem).use(Card).use(Empty).use(NavBar)
  .use(GoodsAction).use(GoodsActionButton).use(GoodsActionIcon)
  .use(Popup).use(Stepper).use(SwipeCell).use(Button)
  .use(Checkbox).use(CheckboxGroup).use(SubmitBar).use(Badge)
  .use(Toast).use(ContactCard).use(AddressEdit).use(AddressList)
  .use(Form).use(Field).use(NoticeBar).use(Lazyload).use(Divider)
  .use(VanImage).use(Uploader)
Vue.config.productionTip = false
Vue.use(Lazyload, {
  preLoad: 1,
  loading: loadimage,
  attempt: 2
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
